<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set value="<%=request.getContextPath()%>" var="ctx"></c:set>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表单</title>
    <meta name="keywords" content="关键字台">
    <meta name="description" content="描述">
    <link rel="shortcut icon" href="favicon.ico"> 
    <link href="${ctx}/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="${ctx}/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${ctx}/css/animate.css" rel="stylesheet">
    <link href="${ctx}/css/style.css?v=4.1.0" rel="stylesheet">
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <div class="row">
                           <div class="col-sm-12">
                                <h3>二维码生成</h3>
                           </div>
                        </div>
                    </div>
                    <div class="ibox-content" id="form" >
                        <form class="form-horizontal m-t" action="qrCodeAdd" method="post" name="QRform" id="QRform">
                            <div class="row">
                            <div class="col-sm-2"></div>
                            <div class="col-sm-8">
                            
                            
                            		<!-- <div class="form-group">
                                        <label class="col-sm-4 control-label">选择二维码形式：</label>
                                        <div class="col-sm-5">
                                            <button type="button" class="btn btn-primary " id="createCode">生成二维码参数</button>
											<button type="button" class="btn " id="createCode_img">生成二维码图片</button>
                                        </div>
                                    </div> -->
                            		
                                    <%-- <div class="form-group">
                                        <label class="col-sm-4 control-label">选择客户：</label>
                                        <div class="col-sm-5">
                                            <select class="form-control" name="customerId" id="customerId">
	                                                <c:forEach var="c" items="${customerList }">
														<option value="${c.id }">${c.c_name}</option>								
													</c:forEach>
                                            </select>
                                        </div>
                                    </div> --%>
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"><span class="text-danger">*</span>生成数量：</label>
                                        <div class="col-sm-5">
                                            <input class="form-control" type="text" name="number" id="number" maxlength="10" placeholder="生成数量最大为500万">
                                        </div>
                                        <span class="help-block m-b-none" id="numberMsg"></span>
                                    </div>
                                    <div class="form-group" id="addNum" style="display:none;">
                                        <label class="col-sm-4 control-label">生成编号：</label>
                                        <div class="col-sm-5">
                                            <div class="radio">
                                                 <label>
                                                     <input type="radio" checked="checked" value="1"  name="addNum" style="position: inherit;">是</label>

                                                 <label>
                                                     <input type="radio"  value="0"  name="addNum" style="position: inherit;">否</label>
                                             </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label">红包金额(元)：</label>
                                        <div class="col-sm-5">
                                             <input class="form-control" type="text" name="money" id="money" maxlength="10" placeholder="金额最大为4999">
                                        </div>
                                    </div> 
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"><span class="text-danger">*</span>前缀链接：</label>
                                        <div class="col-sm-5">
                                            <!-- <input class="form-control" type="text" name="url" placeholder="http://www.qlm.im/code=" id="url"> -->
                                            <select class="form-control" name="url" id="url">
	                                                <c:forEach var="c" items="${urlList }">
														<option value="${c}">${c}</option>								
													</c:forEach>
                                            </select>
                                        </div>
                                        <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 二维码访问链接由自定义链接+系统生成的唯一编码组成</span> -->
                                    </div>
                                    
                                    <div class="form-group">
                                        <label class="col-sm-4 control-label"><span class="text-danger">*</span>编码前缀：</label>
                                        <div class="col-sm-5">
                                            <!-- <input class="form-control" type="text" name="url" placeholder="http://www.qlm.im/code=" id="url"> -->
                                            <select class="form-control" name="code" id="code">
                                               	<option value="a">A</option>
												<option value="b">B</option>								
												<option value="c">C</option>
												<option value="d">D</option>
												<option value="e">E</option>
												<option value="f">F</option>
												<option value="g">G</option>
												<option value="h">H</option>
												<option value="i">I</option>
												<option value="j">J</option>
												<option value="k">K</option>
												<option value="l">L</option>
												<option value="m">M</option>								
												<option value="n">N</option>
												<option value="o">O</option>
												<option value="p">P</option>
												<option value="q">Q</option>
												<option value="r">R</option>
												<option value="s">S</option>
												<option value="t">T</option>
												<option value="u">U</option>
												<option value="v">V</option>
												<option value="w">W</option>
												<option value="x">X</option>
												<option value="y">Y</option>
												<option value="z">Z</option>		
                                            </select>
                                        </div>
                                        <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 二维码访问链接由自定义链接+系统生成的唯一编码组成</span> -->
                                    </div>
                                    
                                    <!-- <div class="form-group" style="display:none">
                                        <label class="col-sm-4 control-label"><span class="text-danger">*</span>图片大小（px）：</label>
                                        <div class="col-sm-5">
                                            <input class="form-control" type="text" name="size" placeholder="200" id="size" value="200">
                                        </div>
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 图片大小值为200代表200px*200px</span>
                                    </div> -->
                                    
                                    <div class="form-group">
                                        <div class="col-sm-8 col-sm-offset-4">
                                            <button class="btn btn-primary" id="createBtn" type="button" onclick="createQR();">&#8195;生成&#8195;</button>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-2"></div>
                            </div>
                        </form>
                    </div>
                    
                    <div class="ibox-content" style="display:none;" id="loading">
				    	<div class="sk-spinner sk-spinner-wave" >
				            <div class="sk-rect1"></div>
				            <div class="sk-rect2"></div>
				            <div class="sk-rect3"></div>
				            <div class="sk-rect4"></div>
				            <div class="sk-rect5"></div>
				        </div>
				    </div>
                    
                </div>
            </div>
        </div>
    </div>
    
    
    
 
    
    
    
    <!-- 全局js -->
    <script src="${ctx}/js/jquery.min.js?v=2.1.4"></script>
    <script src="${ctx}/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- 自定义js -->
    <script src="${ctx}/js/content.js?v=1.0.0"></script>
    <!-- jQuery Validation plugin javascript-->
    <script src="${ctx}/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="${ctx}/js/plugins/validate/messages_zh.min.js"></script>
<%--     <script src="${ctx}/js/demo/form-validate-demo.js"></script> --%>
    <script src="${ctx}/js/plugins/layer/layer.min.js"></script>
    <script src="${ctx}/js/qrcode/Math.uuid.js"></script>
   	<script type="text/javascript">
		var ctx = "${ctx}";
   	</script>
    <script src="${ctx}/js/qrcode/qrcode.js"></script>
</body>
</html>
